<include file="common:head" />

<div class="box">
	<foreach name="list" item='vo'>
		<div class="server_info">
			<!-- 店鋪標題 -->
			<div class="server_name">
				<span style="float: left;">【{$vo.month_card_name}】</span>
				<span style="float: right;">
					<input type="radio" id="radio_{$vo.id}" name="get_monthcard_id" value="{$vo.id}" style="width:50px;height:50px; ">
				</span>
    			<div class="cl"></div>
			</div>
			<!-- 店鋪詳情 -->
			<div class="server_detail">
				<div class="server_detail_left">
					<div class="txt">服務內容:
						<foreach name="vo['server_name_list']" item='v'>
	                		<div server-name="server_{$v.id}">
	                			<input type="hidden" value="{$v.id}">
	                			<span style="float: left;padding-left: 10%;">
	                			服務：【<span style="color:#ff8800">{$v.server_name}</span>】
	                			</span>
	                			<span style="float: right;padding-right: 10%;">
	                			次數：<span style="color:#ff8800;">{$v.server_times}</span>
	                				  <!-- <span style="padding-right:5%;"></span> -->
	                			</span>
	                			<div class="cl"></div>
	                		</div>
                		</foreach>
					</div>
					<div class="txt">價&nbsp;&nbsp;格：{$vo.month_card_total}元</div>
				</div>
			</div>
		</div>
	</foreach>
	<!-- 溫馨提示 -->
	<!-- <div class="tips">
		<img src="__PRIVATE__/Images/horn.png"/>
		【温馨提醒】{$list.tips}
	</div> -->
</div>

<div class="bottom1"  style="height:8%;">
	<div class="go_pay" style="padding:4%;" onclick="javascript:buyForPaymonthcard();">
		購買月卡
	</div>
</div>

<script type="text/javascript">
$('title').html('月卡');
$('.header .title').html('月卡');
$('.header .left').html('<img src="__PRIVATE__/images/left.png" style="width:55%"/>');
$('.header .right').html('');
$('.header .left').click(function(){
	//跳转到洗车点列表
	// window.location.href = "{:U(MODULE_NAME.'/index/wash_shop_list')}";
	//跳转到【单次,月次卡】页面
	window.location.href = "{:U(MODULE_NAME.'/index/gopay',array('id'=>$address_id))}";
});

function buyForPaymonthcard(){
	var month_id = $('input[type=radio]:checked').val();
	if (month_id) {
		$.cookie('address_id',{$address_id}, { expires: 7, path: '/' }); //洗车点id
		window.location.href = "/index/month_card_view/month_id/"+month_id;
	}else{
		layer.open({
		    content: '请选择月卡'
		    ,skin: 'msg'
		    ,style: 'width: 30%; height:5%;padding:20px;font-size:3rem;'
		    ,time: 2 //2秒后自动关闭
		});
	}
}
</script>
